<div class="sidemenu">
    <div class="sidemenu-toggle">
        <img src="__HELP__/images/TB1E6apXHGYBuNjy0FoXXciBFXa-200-200.png"></div>
    <div class="versions">
        <select id="switchBranch">
            <option data-default="true" value="v5.2">v5.2</option>
            <option value="v5.1">v5.1</option>
        </select>
    </div>
    <ul class="top-menu">



        {volist name='categories' id='vo'}

        <li data-count="{$vo.id}" class="menu-item  canopen  menu-item-level-1  open">

            <a>
                {$vo.title}
                <img class="menu-toggle" src="/static/cms/help/images/arrow_down.png">
            </a>
            <ul>

                {php} $docs = $vo->documents()->where('status',1)->order('sort ASC create_time DESC')->select();{/php}

                {volist name='docs' id='doc'}
                <li class="menu-item menu-item-level-2 {eq name='doc.id' value='$open_doc_id'}menu-item-selected open{/eq}">
                    <a href="{:url('cms/Help/detail',['id'=>$doc['id']])}" target="_self">
                        {$doc.title}
                    </a>
                </li>
                {/volist}
                   {php} $children = $vo->children()->where('status',1)->order('sort ASC create_time DESC')->select();{/php}

                {volist name='children' id='child'}
                <li data-count="3" class=" menu-item  canopen  menu-item-level-2 ">
                    <a>
                        {$child.title}
                        <img class="menu-toggle" src="/static/cms/help/images/arrow_down.png">
                    </a>
                    <ul>
                        {php} $docs = $vo->documents()->where('status',1)->order('sort ASC create_time DESC')->select();{/php}
                        {volist name='docs' id='doc'}
                        <li class="menu-item menu-item-level-3 menu-item-selected open">
                            <a href="{:url('cms/Help/detail',['id'=>$doc['id']])}" target="_self">
                                {$doc.title}
                            </a>
                        </li>
                        {/volist}

                    </ul>
                </li>
                {/volist}


            </ul>
        </li>


        {/volist}


    </ul>
</div>